<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%
    	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/";
    %>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
      	<link rel="stylesheet" type="text/css" href="<%=basePath %>/css/updateVideo.css" />
        <link rel="stylesheet" href="<%=basePath %>/css/list.css">
		<link href="<%=basePath %>/css/H-ui.min.css" rel="stylesheet" type="text/css" />
		<link href="<%=basePath %>/css/formsCSS.css" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" type="text/css" href="<%=basePath %>/css/simditor.css" />
		<script src="<%=basePath%>/lib/My97DatePicker/WdatePicker.js"></script>
		<script src="<%=basePath %>/js/jquery.min.js"></script>
		<script src="<%=basePath %>/js/formsJS.js"></script>
		<script src="<%=basePath %>/js/jquery.form.js"></script>
		<script type="text/javascript" src="<%=basePath %>/js/module.js"></script>
		<script type="text/javascript" src="<%=basePath %>/js/hotkeys.js"></script>
		<script type="text/javascript" src="<%=basePath %>/js/uploader.js"></script>
		<script type="text/javascript" src="<%=basePath %>/js/simditor.js"></script>
		<script type="text/javascript" src="<%=basePath %>js/H-ui.js"></script>
		
		<script type="text/javascript">
		$(document).ready(function() { 
			  var options = {
				 	url:'<%=basePath%>message/sendMessage',
					type:'post', 
		            success: showResponse,//成功后执行
		            resetForm:true
		     
				    }
			         $('#messageForm').ajaxForm(options).submit(function(){
			        	return false;
			        }); 
		});
		 
		 function showResponse(responseText, statusText)  {  
		 		if(statusText="success"){
					alert("群发短信成功");
				}else{
					alert("群发短信失败");
				}
			}  
		</script>
    </head>
    <body>
    	<div class="connect_wrap">
    		<h3 style= "text-align: center;">群发短信</h3>
			<div class="row cl" style="max-width:88%;margin-left:8%;">
			<div class="labelText"></div>
	    		<form id="messageForm" method="post" 
	    			enctype="multipart/form-data" >
			    		<div class="col-sm-4"></div>
				    		<div class="col-sm-4">
				    			<div class="boxs">
					    			<input type="text" class="inputBox" name="goodsName"  value="${messageInfo.goodsName}" placeholder="输入产品名称"
					    			required="required">
					    			<select  id="goalMembers" name="goalMembers" class="selectBox" required="required" >
									  	<option value="">发送对象</option>
							  			<option value="1" ${messageInfo.goalMembers == 1 ? 'selected="selected"' : '' }>所有注册用户</option>
							  			<option value="2" ${messageInfo.goalMembers == 2 ? 'selected="selected"' : '' }>所有付费用户</option>
									</select>
					    			<input type="submit"  class="true" value="发送">
									<input type="button"  class="false" value="取消" onclick="window.history.go(-1)">
									<ul style="color:red;">
										<li style="color:red;">1.短信模板：【好芳法课堂】亲爱的{1}，“好芳法课堂”推出新课程{2}，赶紧来关注吧!详见 http://wf.pcein.com/，退订回T</li>
										<li style="color:red;">2.参数{1}：用户名，参数{2}：产品名称</li>
										<li style="color:red;">3.发送对象：所有注册用户，所有付费用户</li>
									</ul>  
									
					</div>
				</div>
	    	</form>
    	</div>
    	</div>
    </body>
   
    
    
</html>
